<template>
  <el-card class="me-area" :body-style="{ padding: '16px' }">
    <div class="me-article-header">
      <a @click="view(articleId)" class="me-article-title">{{articleTitle}}</a>
    </div>
    <div class="me-artile-description">
      {{articleSummary}}
    </div>
    <div class="me-article-footer">
	  	<span class="me-article-author">
	    	<i class="me-icon-author"></i>&nbsp;{{userNikename}}
	    </span>
      <span class="me-pull-right me-article-count">
	    	<i class="el-icon-time"></i>&nbsp;{{createTime}}
	    </span>

    </div>
  </el-card>
</template>

<script>

import router from "@/router";

export default {
  name: 'ArticleItem',
  props: {
    articleId: String,
    articleTitle: String,
    articleSummary: String,
    userNikename: String,
    createTime: String
  },
  data() {
    return {}
  },
  methods: {
    view(id) {
      router.push({path: `/article/${id}`})
    }
  }
}
</script>

<style scoped>

.me-area {
  margin-bottom: 10px;
}

.me-article-header {
  /*padding: 10px 18px;*/
  padding-bottom: 10px;
}

.me-article-title {
  font-weight: 600;
}

.me-article-icon {
  padding: 3px 8px;
}

.me-article-count {
  color: #a6a6a6;
  padding-left: 14px;
  font-size: 13px;
}

.me-pull-right {
  float: right;
}

.me-artile-description {
  font-size: 13px;
  line-height: 24px;
  margin-bottom: 10px;
}

.me-article-author {
  color: #a6a6a6;
  padding-right: 18px;
  font-size: 13px;
}

.el-tag {
  margin-left: 6px;
}

</style>
